package com.lxt.controller.center;

import com.lxt.common.HttpResult;
import com.lxt.pojo.Users;
import com.lxt.service.center.CenterUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kevin.lv
 * @date 2022/8/4 15:54
 */

@Api(value = "center-用户中心", tags = {"用户中心展示的相关接口"})
@RestController
@RequestMapping("center")
public class CenterController {

    @Autowired
    private CenterUserService centerUserService;

    @ApiOperation(value = "查询用户信息", notes = "查询用户信息", httpMethod = "POST")
    @GetMapping("/userInfo")
    public HttpResult userInfo(
            @ApiParam(name = "userId", value = "用户id", required = true)
            @RequestParam String userId) {
        Users users = centerUserService.queryUserInfo(userId);
        return HttpResult.ok(users);
    }


}
